import request from '@/utils/request'

// 查询假期规则列表
export function vacationRuleList(query) {
  return request({
    url: '/vacation/rule/list',
    method: 'get',
    params: query
  })
}

// 查询假期规则详细
export function getVacationPost(postId) {
  return request({
    url: '/vacation/rule/'+postId,
    method: 'get'
  })
}

// 新增假期规则按钮岗位
export function addVacationPost(data) {
  return request({
    url: '/vacation/rule/add',
    method: 'post',
    data: data
  })
}

// 修改假期规则
export function updateVacationPost(data) {
  return request({
    url: '/vacation/rule/update',
    method: 'put',
    data: data
  })
}

// 删除假期规则
export function delVacationPost(postId) {
  return request({
    url: '/vacation/rule/delete/' + postId,
    method: 'delete'
  })
}

// 查询所有的假期规则名称和id
export function getVacationAll(postId) {
  return request({
    url: '/vacation/balance/listVacationName',
    method: 'get'
  })
}

// 获取所有补卡规则名称和id
export function getAllRemedyRuleInfoApi(postId) {
  return request({
    url: '/attendance/remedy/getAllRemedyRuleInfo',
    method: 'get'
  })
}
